﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xtensive.Storage;
using Xtensive.Integrity.Aspects.Constraints;

namespace SMS.Core.Model.Data
{
    class Cust_order : Entity
    {
        [Key, Field]
        public int order_no { get; private set; }

        [Field]
        public Customer customer { get; set; } //TODO:dili ko sure ani.. one to one b ni?a cust order is to one customer?
        //[Field]
        //public int cust_id { get; private set; }

        //[Field]
        //public int staff_id { get; set; }
        
        // naa pay order date... unsay codes para sa order_date?

        [Field(Length = 30)]
        public string invoice_no { get; set; }

        // naa pay invoice date.. unsay codes para sa invoice_date?

        [Field(Precision = 2), RangeConstraint(Min = 0)]
        public decimal amt_due { get; set; }

        [Field(Precision = 2), RangeConstraint(Min = 0)]
        public decimal amt_paid { get; set; }

        [Field(Length = 100)]
        public string remarks { get; set; }

        //naa pay due date.. unsa na codes ang ibutang pra sa due_date? -.-
    }
}
